﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucThemTKB.ascx.cs" Inherits="STT.Admin.UserControls.ucThemTKB" %>


<div id="content-header">
    <div id="breadcrumb">
        <a href="../Admin/Default.aspx?idpage=1" class="tip-bottom" data-original-title="Về bảng điều khiển">
            <i class="icon-home"></i>Trang chính
        </a>
        <a href="../Admin/Default.aspx?" class="current">Quản lý khóa-lớp học</a>
        <a href="../Admin/Default.aspx?" class="current">Quản lý TKB</a>
    </div>
</div>
<div class="widget-box collapsible">
    <div class="widget-title">
        <a href="#collapseOne" data-toggle="collapse" class="">
            <span class="icon"><i class="icon-th"></i></span>
            <h5>Tạo thời khóa biểu</h5>
        </a>
    </div>
    <asp:Image ID="Image1" Width="50px" Height="50px" runat="server" ImageUrl="https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-xpa1/v/t1.0-9/10514739_1438868589716100_7102384791213442633_n.jpg?oh=6a970907f1989a31c8020f55ca552fe7&oe=544B19C3&__gda__=1412701609_fed77e1db6f374ed04ae04e3ec662952" />

                <div id="collapseOne0" class="in collapse" style="height: auto;">
                    <div class="widget-content nopadding">


                        <div class="dataTables_wrapper" role="grid">
                            <%-- Cac dieu kien tim kiem --%>
                            <div class="container-fluid">
                                <div class="row-fluid">
                                    <div class="span6">
                                        <div class="control-group">
                                            <label class="control-label">
                                                Chọn khóa học:
                                            </label>
                                            <div class="controls">
                                                <asp:DropDownList ID="ddlKhoaHoc" runat="server" class="span20"
                                                    OnSelectedIndexChanged="ddKhoaHoc_SelectedIndexChanged">
                                                </asp:DropDownList>                                         
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label">
                                                Chọn ngày học:</label>
                                            <div class="controls">
                                                <asp:TextBox ID="txtNgayHoc" runat="server" CssClass="validate span20"
                                                    data-validate="required" TextMode="Date"
                                                    OnTextChanged="txtNgayHoc_TextChanged1" AutoPostBack="true"></asp:TextBox>
                                            </div>
                                        </div>

                                        <div class="control-group">
                                            <label class="control-label">
                                                Chọn giáo viên:
                                            </label>
                                            <div class="controls">
                                                <asp:DropDownList ID="ddlGiangVien" runat="server" CssClass="span20 validate" data-validate="required"
                                                    Enabled="False">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label">
                                                Chọn phòng học:
                                            </label>
                                            <div class="controls">

                                                <asp:DropDownList ID="ddlPhongHoc" runat="server" CssClass="span20 validate" Enabled="False"
                                                    data-validate="required" >
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="span6">
                                        <div class="control-group">
                                            <label class="control-label">
                                                Chọn lớp học:
                                            </label>
                                            <div class="controls">
                                                <asp:DropDownList ID="ddlLop" runat="server" class="span20" OnSelectedIndexChanged="ddlLop_SelectedIndexChanged"
                                                     AutoPostBack="true">
                                                </asp:DropDownList>

                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label">
                                                Chọn ca học:
                                            </label>
                                            <div class="controls">
                                                <asp:DropDownList ID="ddlCaHoc" runat="server" CssClass="validate span20" Enabled="False"
                                                    data-validate="required">
                                                </asp:DropDownList>
                                              
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label">
                                                Chọn môn học:
                                            </label>
                                            <div class="controls">
                                                <asp:DropDownList ID="ddlMonHoc" runat="server" CssClass="span20 validate" Enabled="false"
                                                    data-validate="required">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                    </div>
                                </div>

                                <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl">
                                    <asp:Button ID="btThemMoi" runat="server" CssClass="btn btn-primary btValidate" Text="Thêm mới"
                                        OnClick="btThemMoi_Click" Enabled="false" />
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>

    <%-- Gridview ket qua tim kiem --%>
    <div class="widget-title">
        <a href="#collapseTwo" data-toggle="collapse" class="">
            <span class="icon"><i class="icon-th"></i></span>
            <h5>Thới khóa biểu</h5>
        </a>
    </div>
    <div class="in collapse" id="collapseTwo" style="height: 600px">
        <div class="widget-content nopadding">
            <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid">
                <asp:GridView ID="gvTKBview" runat="server" CssClass="table table-bordered table-hover"
                    AutoGenerateColumns="False" DataKeyNames="MaTKB"
                    OnRowCommand="gvTKBview_RowCommand"
                    EnableViewState="False" ShowHeaderWhenEmpty="True" OnRowDeleting="gvTKBview_RowDeleting"
                    OnPageIndexChanging="gvTKBview_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:CheckBox ID="cbChonTat" runat="server" onclick="cbChonTat(this);" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="cbChon" runat="server" onclick="cbChon(this);" />
                            </ItemTemplate>
                            <ItemStyle Width="10px" HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:BoundField DataField="TenMonHoc" HeaderText="Tên môn học"
                            SortExpression="TenMonHoc" ItemStyle-CssClass="span2">
                            <ItemStyle CssClass="span2"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField DataField="TenGV" HeaderText="Tên giảng viên"
                            SortExpression="TenGV" ItemStyle-CssClass="span2">
                            <ItemStyle CssClass="span2"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField DataField="NgayHoc" HeaderText="Ngày học"
                            SortExpression="NgayHoc" ItemStyle-CssClass="span2" DataFormatString="{0:dd-MM-yyyy}">
                            <ItemStyle CssClass="span2"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField DataField="TenCa" HeaderText="Ca Học"
                            SortExpression="TenCa" ItemStyle-CssClass="span2">
                            <ItemStyle CssClass="span2"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField DataField="TenPH" HeaderText="Phòng Học" SortExpression="TenPH" />
                        <asp:BoundField DataField="TenLop" HeaderText="Tên Lớp" SortExpression="TenLop" />
                        <asp:TemplateField HeaderText="Sửa" ShowHeader="False">
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
                                    Text="Sửa" CommandName="ChonSua" CommandArgument="<%#((GridViewRow)Container).RowIndex%>">
                                <img src="../../img/edit.jpg" alt="Alternate Text" />
                                </asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle CssClass="span1" HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Xóa" ShowHeader="False">
                            <ItemTemplate>
                                <%-- Bắt sự kiện nhấn nút xóa --%>
                                <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Delete" OnClientClick="return ConfirmDelete('Có chắc bạn muốn xóa?');">
                                <img src="../../img/delete.jpg" alt="Alternate Text" />
                                </asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle CssClass="span1" HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <label>
                            Chưa có dữ liệu
                        </label>
                    </EmptyDataTemplate>
                </asp:GridView>

                <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl">



                    <asp:LinkButton ID="lbXoaTat" runat="server" CssClass="btn" OnClientClick="return ConfirmDelete('Có chắc bạn muốn xóa các dòng đã chọn?');"
                        OnClick="lbXoaTat_Click2">Xóa chọn</asp:LinkButton>

                    <div class="btn-group">

                        <asp:LinkButton ID="ltThemMoi" runat="server" CssClass="btn" PostBackUrl="~/Admin/Default.aspx?idpage=14">Thêm từ file Excel</asp:LinkButton>

                    </div>

                    <asp:Button ID="btnLuu" runat="server" Text="Lưu" class="btn btn-info" OnClick="Button1_Click" />
                </div>
            </div>
        </div>

    </div>



<script>
    $(document).ready(function () {
       
    });
</script>


